import requests

cookies = {
    'sensorsdata2015jssdkchannel': '%7B%22prop%22%3A%7B%22_sa_channel_landing_url%22%3A%22%22%7D%7D',
    'wz_uuid': 'X/60a01134100934c62510213ee7e81faf',
    'Hm_lvt_9ea3e7293b7c088e0d2c88874b63e7dd': '1750413963',
    'HMACCOUNT': '0CA4C3EFF166F198',
    'SSO_SESSION_ID': 'ZDZkNzBlNmUtM2Y0ZC00OTI2LWExN2QtYzg2NWIwNGNhNWY4',
    'ticket': 'eyJhbGciOiJIUzUxMiJ9.ZXlKNmFYQWlPaUpFUlVZaUxDSmhiR2NpT2lKa2FYSWlMQ0psYm1NaU9pSkJNVEk0UTBKRExVaFRNalUySW4wLi5wSmNON29QWlFJd2NUNVljNjZOZF9RLkhua3VoY0VUWUYtSFVkclFWZmxsbXNpQng0QXI1MjFJc2ZNbjVXc3MwTWJOdDdNcEVKdmtwWUd6Tzg0VklUbTdRbGl2YXNEd05VSEhzZTd3VG9LX1M3blVYYkpGaFJxekh4VXFsVlFaMEhyai1jS0Y3WTQ0U2ZvNE1vZW0zeE1yeV9XeEVKR3R6Y29BQWt5dDRVYmVjSUUxQWZxd3B0V25FME5jVU1fTUVJQlpOeUtNbjBEUVRfT1BFS28zSUdxN2hUS1A0UzhMV1hCWFEwQktwYWt1VEVtaXF6eW5ObUdzRHNtRmdQYmo4MERfZFROSkxueDJxWDJBd3c3ZWtFVHkuakdVSWdWU2tMZGhaNjRFRTN6aXd6Zw.csRJCxAaaglhw0q25kWQuNRDtBpXSC2UYpFTJaApQUheYvpaLZYG0ae7tlR-kHm4vhQgWuvSfF8KqfZq1id6cg',
    '_g_t_': '2c73caa28400b13c4e904b822b95e980',
    'token': 'eyJhbGciOiJIUzUxMiJ9.ZXlKNmFYQWlPaUpFUlVZaUxDSmhiR2NpT2lKa2FYSWlMQ0psYm1NaU9pSkJNVEk0UTBKRExVaFRNalUySW4wLi5wSmNON29QWlFJd2NUNVljNjZOZF9RLkhua3VoY0VUWUYtSFVkclFWZmxsb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    'param_sign': 'VgsyiT',
    'acw_tc': 'ac11000117506560029124763e006dfff9cd6f118077a7713675039f1e6d06',
    'Hm_lpvt_9ea3e7293b7c088e0d2c88874b63e7dd': '1750656005',
    'x-web-ip': '171.212.98.35, 119.23.123.172, 120.78.44.129, 100.121.99.234',
    'sensorsdata2015jssdkcross': '%7B%22distinct_id%22%3A%22bcbcaddbd3b1436183c65d1d4f112710%22%2C%22first_id%22%3A%221978ccd69c8c85-091d378df0f858-26011f51-2073600-1978ccd69c915f6%22%2C%22props%22%3A%7B%22%24latest_traffic_source_type%22%3A%22%E7%9B%B4%E6%8E%A5%E6%B5%81%E9%87%8F%22%2C%22%24latest_referrer%22%3A%22%22%2C%22%24latest_search_keyword%22%3A%22%E6%9C%AA%E5%8F%96%E5%88%B0%E5%80%BC_%E7%9B%B4%E6%8E%A5%E6%89%93%E5%BC%80%22%7D%2C%22identities%22%3A%22eyIkaWRlbnRpdHlfY29va2llX2lkIjoiMTk3OGNjZDY5YzhjODUtMDkxZDM3OGRmMGY4NTgtMjYwMTFmNTEtMjA3MzYwMC0xOTc4Y2NkNjljOTE1ZjYiLCIkaWRlbnRpdHlfbG9naW5faWQiOiJiY2JjYWRkYmQzYjE0MzYxODNjNjVkMWQ0ZjExMjcxMCJ9%22%2C%22history_login_id%22%3A%7B%22name%22%3A%22%24identity_login_id%22%2C%22value%22%3A%22bcbcaddbd3b1436183c65d1d4f112710%22%7D%2C%22%24device_id%22%3A%221978ccd69c8c85-091d378df0f858-26011f51-2073600-1978ccd69c915f6%22%7D',
}

headers = {
    'accept': 'application/json, text/plain, */*',
    'accept-language': 'zh-CN,zh;q=0.9',
    'accesstoken': 'eyJhbGciOiJIUzUxMiJ9.ZXlKNmFYQWlPaUpFUlVZaUxDSmhiR2NpT2lKa2FYSWlMQ0psYm1NaU9pSkJNVEk0UTBKRExVaFRNalUySW4wLi5wSmNON29QWlFJd2NUNVljNjZOZF9RLkhua3VoY0VUWUYtSFVkclFWZmxsbXNpQng0QXI1MjFJc2ZNbjVXc3MwTWJOdDdNcEVKdmtwWUd6Tzg0VklUbTdRbGl2YXNEd05VSEhzZTd3VG9LX1M3blVYYkpGaFJxekh4VXFsVlFaMEhyai1jS0Y3WTQ0U2ZvNE1vZW0zeE1yeV9XeEVKR3R6Y29BQWt5dDRVYmVjSUUxQWZxd3B0V25FME5jVU1fTUVJQlpOeUtNbjBEUVRfT1BFS28zSUdxN2hUS1A0UzhMV1hCWFEwQktwYWt1VEVtaXF6eW5ObUdzRHNtRmdQYmo4MERfZFROSkxueDJxWDJBd3c3ZWtFVHkuakdVSWdWU2tMZGhaNjRFRTN6aXd6Zw.csRJCxAaaglhw0q25kWQuNRDtBpXSC2UYpFTJaApQUheYvpaLZYG0ae7tlR-kHm4vhQgWuvSfF8KqfZq1id6cg',
    'content-type': 'application/json',
    'device-id': 'BLlD8sHOGgDlYupW6VvkEgbYc4Vdz0n+k9U9Ug7EwFJPMwt/VkMdGqdxH/m+xlFP1R/HtNJUB8jNU9EPE14KREQ==',
    'eagleeye-pappname': 'fyw9n1jhpf@3a1b5a97673481b',
    'eagleeye-sessionid': 'OCmF7c278q1nyIf3Uc6bx5gnn16X',
    'eagleeye-traceid': '212354a5175065610545610403481b',
    'h5version': 'v1.0.0',
    'origin': 'https://qiye.qizhidao.com',
    'priority': 'u=1, i',
    'referer': 'https://qiye.qizhidao.com/',
    'sec-ch-ua': '"Chromium";v="136", "Google Chrome";v="136", "Not.A/Brand";v="99"',
    'sec-ch-ua-mobile': '?0',
    'sec-ch-ua-platform': '"Windows"',
    'sec-fetch-dest': 'empty',
    'sec-fetch-mode': 'cors',
    'sec-fetch-site': 'same-site',
    'signature': 'b38d20c048d09075a5222d01df808193.GRFpK4',
    'token': 'eyJhbGciOiJIUzUxMiJ9.ZXlKNmFYQWlPaUpFUlVZaUxDSmhiR2NpT2lKa2FYSWlMQ0psYm1NaU9pSkJNVEk0UTBKRExVaFRNalUySW4wLi5wSmNON29QWlFJd2NUNVljNjZOZF9RLkhua3VoY0VUWUYtSFVkclFWZmxsbXNpQng0QXI1MjFJc2ZNbjVXc3MwTWJOdDdNcEVKdmtwWUd6Tzg0VklUbTdRbGl2YXNEd05VSEhzZTd3VG9LX1M3blVYYkpGaFJxekh4VXFsVlFaMEhyai1jS0Y3WTQ0U2ZvNE1vZW0zeE1yeV9XeEVKR3R6Y29BQWt5dDRVYmVjSUUxQWZxd3B0V25FME5jVU1fTUVJQlpOeUtNbjBEUVRfT1BFS28zSUdxN2hUS1A0UzhMV1hCWFEwQktwYWt1VEVtaXF6eW5ObUdzRHNtRmdQYmo4MERfZFROSkxueDJxWDJBd3c3ZWtFVHkuakdVSWdWU2tMZGhaNjRFRTN6aXd6Zw.csRJCxAaaglhw0q25kWQuNRDtBpXSC2UYpFTJaApQUheYvpaLZYG0ae7tlR-kHm4vhQgWuvSfF8KqfZq1id6cg',
    'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36',
    'user-agent-web': 'X/60a01134100934c62510213ee7e81faf',
    # 'cookie': 'sensorsdata2015jssdkchannel=%7B%22prop%22%3A%7B%22_sa_channel_landing_url%22%3A%22%22%7D%7D; wz_uuid=X/60a01134100934c62510213ee7e81faf; Hm_lvt_9ea3e7293b7c088e0d2c88874b63e7dd=1750413963; HMACCOUNT=0CA4C3EFF166F198; SSO_SESSION_ID=ZDZkNzBlNmUtM2Y0ZC00OTI2LWExN2QtYzg2NWIwNGNhNWY4; ticket=eyJhbGciOiJIUzUxMiJ9.ZXlKNmFYQWlPaUpFUlVZaUxDSmhiR2NpT2lKa2FYSWlMQ0psYm1NaU9pSkJNVEk0UTBKRExVaFRNalUySW4wLi5wSmNON29QWlFJd2NUNVljNjZOZF9RLkhua3VoY0VUWUYtSFVkclFWZmxsbXNpQng0QXI1MjFJc2ZNbjVXc3MwTWJOdDdNcEVKdmtwWUd6Tzg0VklUbTdRbGl2YXNEd05VSEhzZTd3VG9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NaU9pSkJNVEk0UTBKRExVaFRNalUySW4wLi5wSmNON29QWlFJd2NUNVljNjZOZF9RLkhua3VoY0VUWUYtSFVkclFWZmxsbXNpQng0QXI1MjFJc2ZNbjVXc3MwTWJOdDdNcEVKdmtwWUd6Tzg0VklUbTdRbGl2YXNEd05VSEhzZTd3VG9LX1M3blVYYkpGaFJxekh4VXFsVlFaMEhyai1jS0Y3WTQ0U2ZvNE1vZW0zeE1yeV9XeEVKR3R6Y29BQWt5dDRVYmVjSUUxQWZxd3B0V25FME5jVU1fTUVJQlpOeUtNbjBEUVRfT1BFS28zSUdxN2hUS1A0UzhMV1hCWFEwQktwYWt1VEVtaXF6eW5ObUdzRHNtRmdQYmo4MERfZFROSkxueDJxWDJBd3c3ZWtFVHkuakdVSWdWU2tMZGhaNjRFRTN6aXd6Zw.csRJCxAaaglhw0q25kWQuNRDtBpXSC2UYpFTJaApQUheYvpaLZYG0ae7tlR-kHm4vhQgWuvSfF8KqfZq1id6cg; creditNo=%22%22; param_sign=VgsyiT; acw_tc=ac11000117506560029124763e006dfff9cd6f118077a7713675039f1e6d06; Hm_lpvt_9ea3e7293b7c088e0d2c88874b63e7dd=1750656005; x-web-ip=171.212.98.35, 119.23.123.172, 120.78.44.129, 100.121.99.234; sensorsdata2015jssdkcross=%7B%22distinct_id%22%3A%22bcbcaddbd3b1436183c65d1d4f112710%22%2C%22first_id%22%3A%221978ccd69c8c85-091d378df0f858-26011f51-2073600-1978ccd69c915f6%22%2C%22props%22%3A%7B%22%24latest_traffic_source_type%22%3A%22%E7%9B%B4%E6%8E%A5%E6%B5%81%E9%87%8F%22%2C%22%24latest_referrer%22%3A%22%22%2C%22%24latest_search_keyword%22%3A%22%E6%9C%AA%E5%8F%96%E5%88%B0%E5%80%BC_%E7%9B%B4%E6%8E%A5%E6%89%93%E5%BC%80%22%7D%2C%22identities%22%3A%22eyIkaWRlbnRpdHlfY29va2llX2lkIjoiMTk3OGNjZDY5YzhjODUtMDkxZDM3OGRmMGY4NTgtMjYwMTFmNTEtMjA3MzYwMC0xOTc4Y2NkNjljOTE1ZjYiLCIkaWRlbnRpdHlfbG9naW5faWQiOiJiY2JjYWRkYmQzYjE0MzYxODNjNjVkMWQ0ZjExMjcxMCJ9%22%2C%22history_login_id%22%3A%7B%22name%22%3A%22%24identity_login_id%22%2C%22value%22%3A%22bcbcaddbd3b1436183c65d1d4f112710%22%7D%2C%22%24device_id%22%3A%221978ccd69c8c85-091d378df0f858-26011f51-2073600-1978ccd69c915f6%22%7D',
}

json_data = {
    'current': 106,
    'matchId': 'cd1ceb48-1ea7-443c-b453-5be6b861bd0b',
    'pageSize': 10,
}


for i in range(1,107):

    
    json_data = {
    'current': i,
    'matchId': 'cd1ceb48-1ea7-443c-b453-5be6b861bd0b',
    'pageSize': 10,
    }

    response = requests.post(
        'https://app.qizhidao.com/qzd-bff-enterprise/qzd/v1/enterprise/batchSearch/pageQueryMatchEnterprise',
        cookies=cookies,
        headers=headers,
        json=json_data,
    )

    data = response.json()

    # for data_id in data['data']['records']:


    #     with open('./url_value18.txt','a+',encoding='utf-8') as f:

    #         f.write(f'https://qiye.qizhidao.com/company/{data_id['id']}.html\n')
    
    for data_matchKey in data['data']['records']:


        with open('./url_value18_code.txt','a+',encoding='utf-8') as f:

            f.write(f'{data_matchKey['matchKey']}\n')

    
    print(f'第{i}页完成！！！！')

    # break

